# change timestamp when render json
module ActiveSupport
  class TimeWithZone
    def as_json(options = nil)
      in_time_zone("Beijing").strftime('%Y-%m-%d %H:%M:%S')
    end
  end
end